package cn.myjerry.prototype;

import java.util.Date;

/**
 * 测试原型模式(浅克隆)
 * @author Jerry
 *
 */
public class Client {
	public static void main(String[] args) throws Exception {
		Date date = new Date(8973482795L);
		Sheep sheep = new Sheep("少丽", date);
		Sheep sheep1 = (Sheep) sheep.clone();
		System.out.println(sheep.getName());
		System.out.println(sheep.getBirthday());
		
		date.setTime(200898980958L);
		System.out.println(sheep.getBirthday());
		
		System.out.println(sheep1.getName());
		System.out.println(sheep1.getBirthday());
	}
}
